Improve the error message stating the working directory has dirty
files (files not yet committed).
Fix #3876.
if dirty.is_empty() {
Ok(())
} else {
- bail!("{} dirty files found in the working directory:\n\n{}\n\n\
+ bail!("{} files in the working directory contain changes that were \
+ not yet committed into git:\n\n{}\n\n\
to proceed despite this, pass the `--allow-dirty` flag",
dirty.len(), dirty.join("\n"))
}
assert_that(p.cargo("package"),
execs().with_status(101)
.with_stderr("\
-error: 1 dirty files found in the working directory:
+error: 1 files in the working directory contain changes that were not yet \
+committed into git:
Cargo.toml
.arg("--host").arg(registry().to_string()),
execs().with_status(101).with_stderr("\
[UPDATING] registry `[..]`
-error: 1 dirty files found in the working directory:
+error: 1 files in the working directory contain changes that were not yet \
+committed into git:
bar